package com.z.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.z.admin.entity.Carousel;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author z
 * @since 2022-03-13
 */
public interface CarouselMapper extends BaseMapper<Carousel> {
    @Select("select count(*) from t_carousel ${whereSql}")
    Integer conutByMap(String whereSql);

    @Select("select * from t_carousel t ${where} order by t.create_time limit #{startPosition} , #{limit}")
    List<Carousel> findPageByWhereSql(String where, Integer startPosition, Integer limit);
}
